import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import BigScreenView from '../views/BigScreenView.vue'

const router = createRouter({
  // mode: 'hash' or 'history'
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 路径和组件的映射
    {
      path: '/', // 路径
      component: HomeView,
      name: 'home'
    },
    {
      path: '/big-screen',
      component: BigScreenView,
      name: 'big-screen'
    }
  ]
})

export default router
